//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;
using System.Web.UI.WebControls;
using CommunityServer.Components;

namespace CommunityServer.Controls 
{
	/// <summary>
	/// Summary description for ForumRatingTypeRadioButtonList.
	/// </summary>
	public class ForumRatingTypeRadioButtonList : RadioButtonList 
	{
		public ForumRatingTypeRadioButtonList() 
		{
			Items.Add( new ListItem( CommunityServer.Components.ResourceManager.GetString("Utility_ForumRatingType_ThreadRating"), SectionRatingType.ThreadRating.ToString() ) );
			Items.Add( new ListItem( CommunityServer.Components.ResourceManager.GetString("Utility_ForumRatingType_PostRating"), SectionRatingType.PostRating.ToString() ) );
		}

		public new SectionRatingType SelectedValue 
		{
			get { return (SectionRatingType) Enum.Parse( typeof( SectionRatingType ), base.SelectedValue ); }
			set { base.SelectedValue = value.ToString(); }
		}
	}
}